import {request} from "@/utils/request.js"

//用户信息
export const getUserInfo = () => {
	return request("/api/toc/customer/detail", "get");
}

//直播列表
export const getLiveList = (data) => {
	return request("/api/toc/live/list", "get",data);
}

//绑定直播间
export const bindLive = (data) => {
	// return request("/api/toc/live/bind/user", "post", data, false);
	return request("/api/toc/customer/bind/live", "post", data, false);
}

//获取直播详情
export function getlive(data) {
	return request("/api/toc/live/detail", "get",data);
}

//观看直播-检查直播状态
export function liveCheck(data) {
	return request("/api/toc/live/watch/check", "post",data);
	// return request("/api/toc/live/record/heartbeat", "post",data);
}

//直播心跳
export function heartbeat(data) {
	return request("/api/toc/live/watch/heartbeat", "post",data);
	// return request("/api/toc/live/record/heartbeat", "post",data);
}

//获取答题
export const questionList = (data) => {
	return request("/api/toc/live/question/list", "get", data);
}

//获取答题
export const questionAn = (data) => {
	return request("/api/toc/live/question/answer", "post", data);
}

//获取答题
export const getStatus = (data) => {
	return request("/api/toc/live/getStatus", "get", data);
}

//红包领取
export const claimAward = (data) => {
	//红包积分领取记录
	return request("/api/toc/live/watch/claimAward", "post", data);
}

//红包记录--新子
export const sendRedPacketApi = (data) => {
	//红包积分领取记录
	return request("/live/sendRedPacket", "post", data);
}

//商户详情
export function merchantDetail(data) {
	return request("/api/toc/merchant/detail", "get",data, false);
}

//会员邀请
export function merchant(data) {
	return request("/api/toc/customer/bind/merchant", "post",data, false);
}



// 以下待删除
//获取直播列表
export const getliveList_api = (data) => {
	return request("/liveinfo/page", "get", data);
}

//获取直播详情
export function getliveInfo(id) {
	return request("/liveinfo/" + id, "get");
}
//直播答题
export const liveusertopicrecord = (data) => {
	//提交答题
	return request("/liveusertopicrecord", "post", data);
}
//查询商城用户信息
export const userInfoGet = () => {
	//查询商城用户信息
	return request("/userinfo", "get", null);
}
//红包记录
export const liverewardrecord = (data) => {
	//红包积分领取记录
	return request("/liverewardinfo/page", "get", data);
}

export const getTimeIndex = (data) => {
	//获取服务器时间戳
	return request("/api/toc/index", "get", data);
}